program fibonacci;

var
  n:integer;
  f1:integer;
  f2:integer;
  f:integer;
  c:char;
  
function foo(i:integer):integer;
begin
	foo:=3*i;
	c:=2
end;

begin
  {read_int(n);}
  if n=0 or n=1 then
    n:=1
  else
    begin
      f1:=1;
      f2:=1;
      while n>1 do
        begin
          f:=f1;
          f1:=f2;
          f2:=f2+f
        end;
      n:=f1     
    end{;
  write_int(n);
  writeln()}
end.
